public class Student5 implements Comparable{
    String name;
    int id;

    public Student5(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return this.getName()+","+getId();
    }

    @Override
    public int compareTo(Object o) {
        o = (Student5) o;
       return ((Student5) o).name.length()- this.name.length();
    }
}
